use sea_orm_migration::{prelude::*, schema::*};
use crate::table::{Account, Permissions, Users};
#[derive(DeriveMigrationName)]
pub struct Migration;
#[async_trait::async_trait]
impl MigrationTrait for Migration {
    async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> {
        Account::create_table(manager).await?;
        Users::create_table(manager).await?;
        Permissions::create_table(manager).await?;
        Ok(())
    }
    async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> {
        Account::delete_table(manager).await?;
        Users::delete_table(manager).await?;
        Permissions::delete_table(manager).await?;
        Ok(())
    }
}